package com.codemeta.bokit.comm.enums;

import com.codemeta.bokit.comm.validation.InEnumKey;
import java.util.Arrays;
import java.util.Set;
import java.util.stream.Collectors;
import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 性别枚举
 *
 * @author apple
 */
@Getter
@AllArgsConstructor
public enum Gender implements InEnumKey {
    /**
     * 性别：0未知、1男性、2女性
     */
    unknown(0),
    man(1),
    woman(2);
    private final int value;

    @Override
    public Set<String> keys() {
        return Arrays.stream(values()).map(g -> String.valueOf(g.getValue())).collect(Collectors.toSet());
    }
}